using SalesPages.DomainModel;
using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class SEOArticleKeywordMap : EntityTypeConfiguration<SEOArticleKeyword>
    {
        public SEOArticleKeywordMap()
        {
            // Primary Key
            this.HasKey(t => t.ID);

            // Properties
            this.Property(t => t.Keyword)
                .HasMaxLength(50);

            this.Property(t => t.Link)
                .HasMaxLength(200);

            this.Property(t => t.Country)
                .HasMaxLength(2);

            // Table & Column Mappings
            this.ToTable("SEOArticleKeyword");
            this.Property(t => t.ID).HasColumnName("ID");
            this.Property(t => t.Keyword).HasColumnName("Keyword");
            this.Property(t => t.Link).HasColumnName("Link");
            this.Property(t => t.Country).HasColumnName("Country");
            this.Property(t => t.Priority).HasColumnName("Priority");
            this.Property(t => t.Active).HasColumnName("Active");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
        }
    }
}
